package jianzhiOffer;

public class Num9 {
    public boolean isPalindrome(int x) {
        String str = "" + x;
        int n = str.length();
        int l = 0, r = n - 1;
        while(l < r) {
            if(str.charAt(l) != str.charAt(r)) return false;
            l++;
            r--;
        }
        return true;
    }
}
